﻿namespace ChampionsLeagueBets.Domain.Common
{
	/// <summary>
	/// Wyrazenia regularne do walidowania.
	/// </summary>
	public static class RegularExpression
	{
		/// <summary>
		/// Wyrazenie walidujace email.
		/// </summary>
		public const string Email = @"^(([\w-]+\.)+[\w-]+|([a-zA-Z]{1}|[\w-]{2,}))@"
					   + @"((([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\.([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\."
					   + @"([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\.([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])){1}|"
					   + @"([a-zA-Z]+[\w-]+\.)+[a-zA-Z]{2,4})$";

		/// <summary>
		/// Wyrazenie walidujace login.
		/// </summary>
		public const string Login = @"(\S)+";

		/// <summary>
		/// Wyrazenie walidujace siłe hasła.
		/// </summary>
		public const string Password = @"(?!^[0-9]*$)(?!^[a-zA-Z]*$)^([a-zA-Z0-9]{8,})$";

		/// <summary>
		/// Wyrazenie walidujące Url.
		/// </summary>
		public const string Url =
			@"^(ht|f)tp(s?)\:\/\/[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*(:(0-9)*)*(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&amp;%\$#_]*)?$";

		/// <summary>
		/// Walidacja harmonogramu crontab.
		/// </summary>
		public const string Cron = @"(\d+(?:-\d+)?(?:,\d+(?:-\d+)?)*(?:,\*)?|\*(?:/\d+)?)";
	}
}
